package com.usf.jprovider.tools;

import java.util.ArrayList;
import java.util.List;

public final class StringTools {

	public static List<String> extractVariables(String query, String tag){
		List<String>varibales = new ArrayList<String>();
		while(query.contains(tag)){
			int begin = query.indexOf(tag) + 1;
			int end = query.indexOf(" ", begin);
			if(end == -1) end = query.length();
			varibales.add(query.substring(begin, end));
			query = query.substring(end);
		}
		return varibales;
	}
	
}
